package com.yulang.common.pojo.goods;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.beans.BeanUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

/**
 * <p>
 * 
 * </p>
 *
 * @author Administrator
 * @since 2019-12-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_category_brand")
public class CategoryBrand implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 分类ID
     */
    @TableId(value = CATEGORY_ID, type = IdType.INPUT)
    private Integer categoryId;

    /**
     * 品牌ID
     */
    @TableField(BRAND_ID)
    private Integer brandId;


    public static final String CATEGORY_ID = "`category_id`";

    public static final String BRAND_ID = "`brand_id`";


    public static final String CATEGORY_ID_COMMENT = "分类ID";

    public static final String BRAND_ID_COMMENT = "品牌ID";



    public static CategoryBrand of(Object obj) {
        CategoryBrand e = new CategoryBrand();
        BeanUtils.copyProperties(obj, e);
        return e;
    }

    public static QueryWrapper<CategoryBrand> queryWrapper(Object obj) {
        return new QueryWrapper<>(of(obj));
    }

}
